home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DESKHING
/
RUBICON1.LZH
/
RUP22C.EXE
/
PSCRIPT.H
< prev
next >
Wrap
Text File
|
1990-12-16
|
2KB
|
129 lines
/hollow-thick 4 def
/stroke-thick 1 def
/fin-1
{
eofill
} bind def
/fin-2
{
gsave
eofill
grestore
stroke-thick setlinewidth
stroke
} bind def
/fin-3
{
hollow-thick setlinewidth
stroke
} bind def
% Normal Finish character; either fill only, stroke and fill
/fin-normal {fin-2} bind def
% Finish character; either fill only, stroke and fill, or hollow
/fin-char {fin-normal} def
/ops [ {curveto}{lineto}{moveto}{closepath}{newpath}{stroke}{eofill}
{gsave}{grestore}{setlinewidth}{setcachedevice} ] bind def
/args [ 6 2 2 0 0 0 0 0 0 1 6 ] bind def
/comp-char
{
newpath
set-char exec
0 get-byte exec
{
dup 255 eq {fin-char exit} if
mark
exch
dup
args exch get
5 -2 roll
3 -1 roll
{get-word} repeat
counttomark 1 add 2 roll
counttomark -1 roll
ops exch get exec
pop
get-byte exec
} loop
3 {pop} repeat
end
} bind def
/get-byte
{
dup
1 add
exch
3 -1 roll
dup
4 1 roll
exch
get
} bind def
/get-word
{
get-byte exec
128 sub
256 mul
3 1 roll
get-byte exec
4 -1 roll
add
3 1 roll
} bind def
/set-char
{
exch
dup dup
/Encoding
get
4 -1 roll
get
exch
/CharStrings
get
exch
get
exch
begin
} bind def
% POSTSCRIPT PROCEDURE TO DRAW A RULING BOX
% Syntax: "row col width height rule"
/rule {
/height exch def
/width exch def
/col exch def
/row exch def
newpath
/row row -1 mul def
col row moveto
0 height rlineto
width 0 rlineto
height -1 mul 0 exch rlineto
width -1 mul 0 rlineto
fin-normal
} bind def
% Read a string of "count" bytes
% count acquire_string
/acquire_string {
/count exch def
count string } def
% POSTSCRIPT PROCEDURE TO INITIATE BITMAP GRAPHICS
% width height col row start_raster
/start_raster {
/row exch def
/col exch def
/height exch def
/width exch def
/neg_height height -1 mul def
/baseline 0 row sub height sub def
gsave
col baseline translate
width height scale % Stretch image to correct size
% Transformation matrix turns image upside down
width height 1 [ width 0 0 neg_height 0 height ] {
currentfile { width 4 idiv } acquire_string readhexstring pop
} bind image
} def